const mongoose = require('mongoose');
const moment = require('moment'); //引入moment，因为mongodb默认时间是UTC国际标准时间
moment.locale('zh-cn'); //设置时区为东八区

const scheme = new mongoose.Schema({
    movieId: {type: String},
    customid: {type: String},
    content: {type: String},
    startTime: {
        type: String,
        default: () => {
            return moment().format('YYYY-MM-DD HH:mm:ss')
        }
    }
});

module.exports = mongoose.model('Comment', scheme);